package language;

/**
 * This class is to load all action name in different langauge
 */
import java.util.Locale;
import java.util.ResourceBundle;

public class LanguageLoader
{
    // List of all action name
    public static String file = "File";
    public static String _new = "New";
    public static String open = "Open...";
    public static String save = "Save";
    public static String saveas = "Save As...";
    public static String properties = "Properties";
    public static String lang = "Language";
    public static String quit = "Quit";
    public static String edit = "Edit";
    public static String undo = "Undo";
    public static String redo = "Redo";
    public static String selectall = "Select All";
    public static String group = "Group";
    public static String ungroup = "Ungroup";
    public static String delete = "Delete";
    public static String insert = "Insert";
    public static String rect = "Rectangle";
    public static String circle = "Circle";
    public static String line = "Line";
    public static String exportPDF = "Export PDF";
    public static String exportPNG = "Export PNG";
    
    /**
     * This method is to properties file in different language
     * 
     * @param language
     *            the language in properties file format is, en, ja and de
     * @param country
     *            the county format ie,DE,JP
     */
    public LanguageLoader(String language, String country)
    {
        ResourceBundle rb;
        if (country == "JP")
            rb = Utf8ResourceBundle.getBundle("language.Language",
                    new Locale(language, country));
        else
            rb = ResourceBundle.getBundle("language.Language",
                    new Locale(language, country));
        file = rb.getString("file");
        _new = rb.getString("new");
        open = rb.getString("open");
        save = rb.getString("save");
        saveas = rb.getString("saveas");
        properties = rb.getString("properties");
        lang = rb.getString("language");
        quit = rb.getString("quit");
        edit = rb.getString("edit");
        undo = rb.getString("undo");
        redo = rb.getString("redo");
        selectall = rb.getString("selectall");
        group = rb.getString("group");
        ungroup = rb.getString("ungroup");
        delete = rb.getString("delete");
        insert = rb.getString("insert");
        rect = rb.getString("rect");
        circle = rb.getString("circle");
        line = rb.getString("line");
        exportPDF = rb.getString("exportPDF");
        exportPNG = rb.getString("exportPNG");
    }
    
}
